<template>
  <div class="message" v-show="show">
    <p>{{ msg }}</p>
  </div>
</template>

<script>
export default {
  data() {
    return {
      show: true,
      msg: '请填写信息内容'
    }
  }
}
</script>

<style lang="less">
.message {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 300px;
  padding: 20px 10px;
  border-radius: 4px;
  transform: translateX(-50%) translateY(-50%);
  text-align: center;
  color: #fff;
  z-index: 10000;
  line-height: 26px;
  font-size: 14px;
  background-color: rgba(0, 0, 0, 0.8);
  transition: all 0.2s linear;
  p {
    line-height: 26px;
    text-align: center;
  }
}
</style>
